package cn.miao;

import cn.hutool.http.HttpUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * @program: springcloud-hrm
 * @description:
 * @author: MiaoWei
 * @create: 2021-12-07 10:36
 **/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = AuthApplication.class)
public class test {
    @Value("#{'${oauth2.url.token}'}")
    private  String OAUTH2_TOKEN;
    @Test
    public void test() throws Exception{
        String post = HttpUtil.post("http://localhost:1060/oauth/token?client_id=admin&client_secret=123&grant_type=password&username=yhptest1&password=123", "");
        System.out.println(post);
    }
}
